home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
HYPERCAR
/
BUTTONS_
/
COOL_BUT.TON
/
card_4042.txt
< prev
next >
Wrap
Text File
|
1988-03-23
|
5KB
|
246 lines
-- card: 4042 from stack: in.TON
-- bmap block id: 2790
-- flags: 0000
-- background id: 3537
-- name:
-- part 2 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=400 top=314 right=336 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 21
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Spiral2
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set userLevel to 3
ask "Which tool?" with "oval tool"
put it into ThisTool
choose ThisTool
set multiple to true
set centered to false
domenu "select all"
domenu "clear picture"
put 250 into xcenter
put 180 into ycenter
put 100 into radius
put xcenter into lastx
put ycenter - radius into lasty
put 100 into numbsegs
put 0 into angle
repeat until radius is 0
put xcenter + round (radius * sin (angle)) into x
put ycenter - round (radius * cos (angle)) into y
drag from lastx, lasty to x, y
put x into lastx
put y into lasty
add (2 * pi * 1 / numbsegs) to angle
subtract 1/2 from radius
end repeat
Choose browse tool
set userlevel to savelevel
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=400 top=290 right=312 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 21
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Spiral
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set userLevel to 3
choose brush tool
set brush to random(32)
domenu "select all"
domenu "clear picture"
put 250 into xcenter
put 180 into ycenter
put 100 into radius
put xcenter into lastx
put ycenter - radius into lasty
put 50 into numbsegs
put 0 into angle
repeat until radius is 0
put xcenter + round (radius * sin (angle)) into x
put ycenter - round (radius * cos (angle)) into y
drag from lastx,lasty to x, y
put x into lastx
put y into lasty
add (2 * pi * 1 / numbsegs) to angle
subtract 1/2 from radius
end repeat
choose browse tool
set userlevel to savelevel
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=400 top=265 right=288 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Multi lines
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set userLevel to 3
choose line tool
domenu "select all"
domenu "clear picture"
ask "what origin?" with "0,0"
put it into Origin
ask "what increments?" with 5
put it into Incr
put 0 into Yval
put 512 into xval
repeat until Yval>348
drag from Origin to 512,yval
add Incr to Yval
end repeat
Choose browse tool
set userlevel to savelevel
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=400 top=241 right=263 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Hyperbole
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set userLevel to 3
choose line tool
domenu "select all"
domenu "clear picture"
set centered to false
set grid to false
put 25 into x1
put 25 into y1
put 25 into y2
put 500 into x2
ask "what increments?" with 10
put it into Incr
repeat until x2 < y2
drag from x1,y1 to x2,y2
add Incr to y1
subtract incr from x2
end repeat
choose browse tool
set userlevel to savelevel
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=400 top=216 right=239 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 21
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Multi shapes
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set userLevel to 3
answer "Draw shape with what tool?" with "line" or "Reg. polygon" or "Oval"
if it is "line" then choose line tool
if it is "oval" then choose Oval tool
if it is "reg. polygon" then
choose regular polygon tool
set polysides to random(6) +2
end if
ask "Radius? (in pixels)" with "112"
if it is "cancel" then exit mouseup
put it into Radius
ask "Increments?" with "8"
if it is "cancel" then exit mouseup
put it into incr
-- -- Make the radius evenly divisible by Increments
put trunc(radius/incr) * incr into Radius
domenu "select all"
domenu "clear picture"
set centered to true
set grid to false
put 250 into h1 -- the center h and v points
put 200 into v1
put h1-radius into h2 -- the first side's first end point
put 200 into v2
repeat while abs(v2-v1) <= abs(h2-h1)
drag from h1,v1 to h2,v2
subtract incr from v2
end repeat
put 250 into h2 -- the second side's first end point
put v1-radius into v2
repeat while abs(h2-h1) <= abs(v2-v1)
drag from h1,v1 to h2,v2
add incr to h2
end repeat
choose browse tool
set userLevel to saveLevel
end mouseUp
-- part contents for background part 1
----- text -----
Painting buttons